package com.xiaoshou.pojo;

import java.util.ArrayList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "lectures", catalog = "market")
public class Lectures implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	private String id;
	private User user;
	private String scheduletime;
	private String purpose;
	private String feedback;
	private String contentrecord;
	private String reserlecture;
	private String state;
	private String lectureaddress;

	private String reallytime;
	private List<LecturesDepartmentsRel> lecturesDepartmentsRels = new ArrayList<LecturesDepartmentsRel>();

	private List<Feedback> feedbackList;

	@Id
	@Column(name = "id", unique = true, nullable = false, length = 40)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "userid", nullable = false)
	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Column(name = "scheduletime", length = 45)
	public String getScheduletime() {
		return this.scheduletime;
	}

	public void setScheduletime(String scheduletime) {
		this.scheduletime = scheduletime;
	}

	@Column(name = "purpose", length = 45)
	public String getPurpose() {
		return this.purpose;
	}

	public void setPurpose(String purpose) {
		this.purpose = purpose;
	}

	@Column(name = "feedback", length = 65535)
	public String getFeedback() {
		return this.feedback;
	}

	public void setFeedback(String feedback) {
		this.feedback = feedback;
	}

	@Column(name = "contentrecord", length = 65535)
	public String getContentrecord() {
		return this.contentrecord;
	}

	public void setContentrecord(String contentrecord) {
		this.contentrecord = contentrecord;
	}

	@Column(name = "reserlecture", length = 45)
	public String getReserlecture() {
		return this.reserlecture;
	}

	public void setReserlecture(String reserlecture) {
		this.reserlecture = reserlecture;
	}

	@Column(name = "state", length = 45)
	public String getState() {
		return this.state;
	}

	public void setState(String state) {
		this.state = state;
	}

	@Column(name = "lectureaddress", length = 100)
	public String getLectureaddress() {
		return this.lectureaddress;
	}

	public void setLectureaddress(String lectureaddress) {
		this.lectureaddress = lectureaddress;
	}

	@Column(name = "reallytime", length = 45)
	public String getReallytime() {
		return reallytime;
	}

	public void setReallytime(String reallytime) {
		this.reallytime = reallytime;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "lectures")
	public List<LecturesDepartmentsRel> getLecturesDepartmentsRels() {
		return lecturesDepartmentsRels;
	}

	public void setLecturesDepartmentsRels(
			List<LecturesDepartmentsRel> lecturesDepartmentsRels) {
		this.lecturesDepartmentsRels = lecturesDepartmentsRels;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "lectures")
	public List<Feedback> getFeedbackList() {
		return feedbackList;
	}

	public void setFeedbackList(List<Feedback> feedbackList) {
		this.feedbackList = feedbackList;
	}

}